package net.oschina.app.viewpagerfragment.general;

import net.oschina.app.adapter.general.NewsListAdapter;
import net.oschina.app.base.BaseListAdapter;
import net.oschina.app.base.BaseListFragment;
import net.oschina.app.bean2.GeneralNewsBean;
import net.oschina.app.protocol.AccessProtocol;
import net.oschina.app.protocol.general.NewsProtocol;

import java.util.List;

/**
 * Created by Shinelon on 2017/1/15.
 */

public class NewsFragment extends BaseListFragment {

    @Override
    protected List parseData(Object body) {
        return ((GeneralNewsBean)body).getNewslist();
    }

    @Override
    protected AccessProtocol getProtocol() {
        return new NewsProtocol();
    }

    @Override
    protected BaseListAdapter getAdapter() {
        return new NewsListAdapter();
    }
}
